This program was created to import Navigator archive files. It shows how to use Receive Packet to import a file with no regular field delimeters.
Usage:
To use it, you must first have a an archive file created by Navigator. This sample will open in the custom enviroment. Select Import Text, and select the archive file you want to import. You will see a message indicating the date and time the message was archived, and also the number of messages imported so far. When it's done, it will ask you if you want to print the imported threads. Since the current shipping version of 4D doesn't print variable frame text fields, cancel this dialog. When you Quit from the Custom environment to the User, the current selection will be the threads you just imported.
Things to check out:
Look at the Global procedure Receive Message. This is the procedure that reads in text looking for certain characters that are common to all messages. I read in a line at time, since I know that each line ends with a carraige retern. Note that CIS doesn't give you the date in Macintosh format, so I have to convert the date to a Macintosh date using the function FixDate. GetSubject takes care of eliminating the pound sign that sometimes appears in front of some subjects.
Problems:
For the most part, it's pretty smart about getting the fields right, but it appears to clip the last character off of some subjects. I'm still looking into this. It's file format is incompatible with previous versions, so don't export your old data into this one. (I split up the subject, message no it's responding to, and the message number). Variable frame text printing will hopefully appear in a future version.
Tips:
After importing, sort the records by Subsection, Subject, and message number to read the threads in a logical order.